home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * (a) (C) 1990 by Adobe Systems Incorporated. All rights reserved.
- *
- * (b) If this Sample Code is distributed as part of the Display PostScript
- * System Software Development Kit from Adobe Systems Incorporated,
- * then this copy is designated as Development Software and its use is
- * subject to the terms of the License Agreement attached to such Kit.
- *
- * (c) If this Sample Code is distributed independently, then the following
- * terms apply:
- *
- * (d) This file may be freely copied and redistributed as long as:
- * 1) Parts (a), (d), (e) and (f) continue to be included in the file,
- * 2) If the file has been modified in any way, a notice of such
- * modification is conspicuously indicated.
- *
- * (e) PostScript, Display PostScript, and Adobe are registered trademarks of
- * Adobe Systems Incorporated.
- *
- * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
- * CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
- * AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
- * ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
- * OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
- * WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
- * WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
- * DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
- * OF THIRD PARTY RIGHTS.
- */
-
- /*
- filename : hdshowany.h
- date created : 15-feb-90
- last updated : 23-oct-90
- author : ross a jeynes
- porter : ken r fromm
- purpose : structure definitions, defines, global variables for the high level
- driver routines
- */
-
- /*
- * The following are "attributes," or "events," that can happen at a certain character
- * on the line of text. The field "attr" in the showstruct structure is an array of
- * these attributes, whoose indexes correspond to the "text" field.
- */
-
- #import <appkit/graphics.h>
-
- /* showany attributes: */
- #define SA_NOATTR 0 /* no attribute for this character */
- /* attributes on */
- #define SA_UNDRLN_ON 1 /* underline */
- #define SA_DBLUND_ON 2 /* double underline */
- #define SA_STRIKE_ON 4 /* strike-through */
- #define SA_SUPER_ON 8
- #define SA_SUB_ON 16
-
- #define SA_UNDRLN_OFF 32 /* attributes off */
- #define SA_DBLUND_OFF 64
- #define SA_STRIKE_OFF 128
- #define SA_SUPER_OFF 256
- #define SA_SUB_OFF 512
-
- #define SA_PRKERN 1024 /* Pair kern */
- #define SA_VKERN 2048
- #define SA_ABSMOV 4096
-
- #define SA_FONTCHG 8192 /* Font change */
- #define SA_SPACEADJ 16384 /* Space adjustment value change */
- #define SA_TRACKADJ 32768 /* Track kern value change */
-
- #define SA_TXON_ATTRS (SA_UNDRLN_ON|SA_STRIKE_ON|SA_DBLUND_ON)
- #define SA_TXOFF_ATTRS (SA_UNDRLN_OFF|SA_STRIKE_OFF|SA_DBLUND_OFF)
- #define SA_NOTTX_ATTRS (SA_PRKERN|SA_FONTCHG|SA_SPACEADJ|SA_TRACKADJ)
-
-
- /* def's for "encoding" array in showstruct */
- #define SA_DEFAULT 0 /* don't re-encode (font specific vector) */
- #define SA_EXTENDED 1 /* use application text encoding */
-
- typedef struct showstruct
- {
- char *text; /* The characters to be shown (null terminated) */
- unsigned int *attr; /* an array equal in length to *text that describes attribute(s) */
-
- NXCoord *prkern; /* amount of pair kern (array) */
- NXCoord *vkern; /* amount of vertical kern (array) */
- NXPoint *absmov; /* coordinates for absolute movetos */
- NXCoord *spaceadj; /* amount to adjust space character */
- NXCoord *trackkern; /* track kern adjustment amount */
-
- int textlen; /* actual number of characters in text and attr */
- int prkernlen; /* actual number of entries filled in prkern array */
- int vkernlen; /* actual number of entries in vkern array (used for super/sub) */
- int absmovlen; /* actual number of absolute movetos / 2 coords*/
- int spaceadjlen; /* actual number of entries filled in space changes array */
- int trackkernlen; /* actual number of entries filled in track kerns array */
-
- /*
- * These values are unimportant to showany(), but are used in the
- * building of the structure by the routines in buildshow.c. They allow
- * dynamic re-sizing of the arrays, but may be removed if the buildshow
- * routines are not used to create the showstruct data structure
- */
-
- int textmax; /* max length of the text string; length of "attr" as well */
- int prkernmax; /* max length allocated for prkern array */
- int vkernmax; /* max length allocated for vkern array */
- int absmovmax; /* max length allocated for absmov array */
- int spaceadjmax; /* max length allocated for space changes array */
- int trackkernmax; /* max length allocated for track kerns array */
- } ShowStruct;
-
-
- /******* Prototypes for High Level Driver ******/
- void ShowAny(ShowStruct *show);
-